package com.zzw.bridge.common.entitys.sys;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 登录日志
 *
 * @author XiaoJie
 * @date 2025-05-13 09:43:17
 */
@Data
@ApiModel(value = "系统登录日志实体")
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_log_login")
public class SysLogLoginEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "id")
	@TableId
	private String id;

	@ApiModelProperty(value = "用户名")
	@TableField("username")
	private String username;

	@ApiModelProperty(value = "登录IP")
	@TableField("ip")
	private String ip;

	@ApiModelProperty(value = "登录地点")
	@TableField("address")
	private String address;

	@ApiModelProperty(value = "User Agent")
	@TableField("user_agent")
	private String userAgent;

	@ApiModelProperty(value = "登录状态(0：失败;1：成功")
	@TableField("status")
	private Integer status;

	@ApiModelProperty(value = "操作信息（0：登录成功；1：退出成功；2：验证码错误；3：账号密码错误")
	@TableField("operation")
	private Integer operation;

	@ApiModelProperty(value = "创建时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@TableField("create_time")
	private Date createTime;

}
